import { lazy } from "react";

export let mainRouter = [
    {
        path:"/index/home",
        element:lazy(()=>import("../page/index/Home")),
        title:"首页",
        icon:"WapHomeO"
    },
    {
        path:"/index/duoduoVideo",
        element:lazy(()=>import("../page/index/DuoduoVideo")),
        title:"多多视频",
        icon:"VideoO"
    },
    {
        path:"/index/classify",
        element:lazy(()=>import("../page/index/Classify")),
        title:"分类",
        icon:"TodoListO",
        
    },
    {
        path:"/index/Chat",
        element:lazy(()=>import("../page/index/Chat")),
        title:"聊天",
        icon:"ChatO"
    },
    {
        path:"/index/personal",
        element:lazy(()=>import("../page/index/Personal")),
        title:"个人中心",
        icon:"Contact"
    }
]

const routes = [
    {
        from:"/",
        to:"/index/home"
    },
    {
        path:"*",
        element:lazy(()=>import("../page/Eorry404"))
    },
    {
        path:"/detail/:id",
        element:lazy(()=>import("../page/Detail"))
    },
    {
        path:"/index",
        element:lazy(()=>import("../page/Index")),
        children:mainRouter
    },
    {
        path:"/login",
        element:lazy(()=>import("../page/Login"))
    }
]

export default routes